<!--{subtemplate common/header}-->

<!-- main START -->
<div id="main" style="width: 980px;">
	<div class="post">
			<!--{subtemplate member/usergroup_header}-->
			<!--{eval 
				$permtype = array(0 => '{lang Normal permission}', 1 => '{lang Mod permission}');
			}-->
			<div class="tdats">
				<table cellpadding="0" cellspacing="0" class="tdat">
					<tr><th class="c0">&nbsp;</th></tr>
					<tr><th class="alt">&nbsp;</th></tr>
					<tbody class="ca">
						<!--{loop $bperms $key $perm}-->
						<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
							<td>{lang $perm}</td>
						</tr>
						<!--{/loop}-->
					</tbody>
				</table>
				<table cellpadding="0" cellspacing="0" class="tdat tfx{if !$group}f{/if}">
					<tr>
						<th class="c0"><h4>{lang My main usergroup} - $maingroup[grouptitle]</h4></th>
					</tr>
					<tr>
						<th class="alt"><span class="notice">{lang Credits}: $space[credits]</span></th>
					</tr>
					<!--{echo permtbody($maingroup)}-->
				</table>
				<!--{if $group}-->
					<!--{if $switchtype == 'user'}--><!--{eval $cid = 1;$tlang = '{lang Common User Group}';}--><!--{/if}-->
					<!--{if $switchtype == 'upgrade'}--><!--{eval $cid = 2;$tlang = '{lang Promotion groups}';}--><!--{/if}-->
					<!--{if $switchtype == 'admin'}--><!--{eval $cid = 3;$tlang = '{lang Site Management Group}';}--><!--{/if}-->
					<ul id="tba" class="tb c$cid">
						<li id="c$cid">$tlang - $currentgrouptitle</li>
					</ul>
					<div class="tscr">
						<table cellpadding="0" cellspacing="0" class="tdat">
							<tr>
								<th class="alt h">
									<!--{if $group['grouptype'] == 'member'}-->
										<!--{eval $v = $group[groupcreditshigher] - $_G['member']['credits'];}-->
										<!--{if $_G['group']['grouptype'] == 'member' && $v > 0}-->
											<span class="notice">{lang Upgrade to this user group, need} $v {lang credits}</span>
										<!--{else}-->
											<span class="notice">{lang Lower limit} $group[groupcreditshigher]</span>
										<!--{/if}-->
									<!--{/if}-->
									<!--{if isset($publicgroup[$group['groupid']]) && $group['groupid'] != $_G['groupid'] && $publicgroup[$group['groupid']]['allowsetmain']}-->
										<a href="index.php?option=member&task=usergroup&do=switch&groupid=$group['groupid']&perms=$type&handlekey=switchgrouphk" class="xw1 xi2" onclick="showWindow('group', this.href, 'get', 0);">{lang Set main usergroup}</a>
									<!--{/if}-->
									<!--{if in_array($group['groupid'], $extgroupids) && $switchmaingroup && $group['grouptype'] == 'special' && $group['groupid'] != $_G['groupid']}-->
										<a href="index.php?option=member&task=usergroup&do=exit&groupid=$group['groupid']&perms=$type&handlekey=exitgrouphk" class="xw1 xi2" onclick="showWindow('group', this.href, 'get', 0);">{lang Exit usergroup}</a>
									<!--{/if}-->
									<!--{if array_key_exists($group['groupid'], $groupterms['ext'])}-->
										<span class="notice">{lang Time limit}: <!--{date($groupterms[ext][$group['groupid']])}--></span>
									<!--{/if}-->
								</th>
							</tr>
							<!--{echo permtbody($group)}-->
						</table>
					</div>
				<!--{/if}-->
			</div>
			<img src="{IMGDIR}/data_valid.gif" alt="data_valid" class="vm" /> {lang That the right to operate}&nbsp;
			<img src="{IMGDIR}/data_invalid.gif" alt="data_invalid" class="vm" /> {lang That authority to operate}
			<div id="gmy_menu" class="p_pop" style="display:none">$usergroups[my]</div>
			<div id="gupgrade_menu" class="p_pop" style="display:none;position: relative;">$usergroups[upgrade]</div>
			<div id="guser_menu" class="p_pop" style="display:none">$usergroups[user]</div>
			<div id="gadmin_menu" class="p_pop" style="display:none">$usergroups[admin]</div>
{eval
function permtbody($maingroup) {
global $bperms, $aperms;
}
<tbody class="ca">
	<!--{loop $bperms $key $groupbperm}-->
	<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
		<td>
			<!--{if $groupbperm == 'creditshigher' || $groupbperm == 'readaccess'}-->
			$maingroup[$groupbperm]
			<!--{elseif $groupbperm == 'allowsearch'}-->
				<!--{if $maingroup['allowsearch'] == '0'}-->{lang Search is disable}<!--{elseif $maingroup['allowsearch'] == '1'}-->{lang Only search title}<!--{else}-->{lang Full content search}<!--{/if}-->
			<!--{else}-->
				<!--{if $maingroup[$groupbperm] >= 1}--><img src="{IMGDIR}/data_valid.gif" alt="data_valid" /><!--{else}--><img src="{IMGDIR}/data_invalid.gif" alt="data_invalid" /><!--{/if}-->
			<!--{/if}-->
		</td>
	</tr>
	<!--{/loop}-->
</tbody>

<!--{eval
}
}-->
</div></div>
<!--{template common/footer}-->
